<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<canvas width="500" height="550"></canvas>

		<div>
			<label>fen:</label><input type="text" name="fen" />
			<input type="button" value="submit" onclick="submit()" />
		</div>
		<button onclick="chess.back()">撤销</button>
		
	</body>
</html>

<script type="text/javascript" src="js/board.js"></script>
<script type="text/javascript" src="js/chess.js"></script>
<script type="text/javascript" src="js/exchange.js"></script>
<script type="text/javascript" src="js/click.js"></script>

<script type="text/javascript">
	let chess = new Chess();
	let fen = "rnbakabnr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RNBAKABNR";
	chess.fen = fen;

	chess.pieces = fenToPieces(fen);

	chess.show();

	function submit() {
		chess.submit();
	}
	
</script>
